<% layout('/layouts/default.html', {title: '批示页面', libs: ['validate','fileupload']}){ %>
<div class="main-content">
	<div class="box box-main">
		<#form:form id="inputForm" model="${dcSupTaskActionExplain}" action="${ctx}/home/homePage/save" method="post" class="form-horizontal">
		<%if(dcSupTaskActionExplain.explainContent == ''|| dcSupTaskActionExplain.explainContent ==null){%>
		<div class="box-body">
		<%}else{%>
		<div class="box-body" style="height: 352px;">
		<%}%>
			<div class="col-xs-12" style="margin-bottom: 18px;">
				<#form:hidden path="actionId" value="${dcSupTaskActionExplain.actionId}" />
				<#form:hidden path="explainCode" value="${dcSupTaskActionExplain.explainCode}" />
				<%if(dcSupTaskActionExplain.explainContent == ''|| dcSupTaskActionExplain.explainContent ==null){%>
				<#form:textarea path="explainContent" rows="12" maxlength="1000" class="form-control" placeholder="请在此处输入批示"/>
				<% }else{ %>
				<div class="control-label " style="text-align: left;overflow:auto; white-space: pre-line;">${text(dcSupTaskActionExplain.explainContent)}</div>
				<%}%>
			</div>
		</div>
		<%if(dcSupTaskActionExplain.explainContent == ''|| dcSupTaskActionExplain.explainContent ==null){%>
		<div class="box-footer">
			<div class="row" style="text-align: right;">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('确 定')}</button>&nbsp;
					<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
				</div>
			</div>
		</div>
		<%}%>
	</#form:form>
</div>
</div>
<% } %>
<script>
	$("#inputForm").validate({
		submitHandler: function(form){
			js.ajaxSubmitForm($(form), function(data){
				js.showMessage(data.message);
				if(data.result == Global.TRUE){
					js.closeCurrentTabPage(function(contentWindow){
						contentWindow.page();
					});
				}
			}, "json");
		}
	});
</script>